home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-9.10-netbook-remix-PL.iso / casper / filesystem.squashfs / usr / share / mc / bin / mc-wrapper.csh next >
Text File  |  2009-10-25  |  389b  |  21 lines

  1. set MC_USER="`id | sed 's/[^(]*(//;s/).*//'`"
  2.  
  3. if ($?TMPDIR) then
  4.     setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$
  5. else
  6.     setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$
  7. endif
  8.  
  9. /usr/bin/mc -P "$MC_PWD_FILE" $*
  10.  
  11. if (-r "$MC_PWD_FILE") then
  12.     setenv MC_PWD "`cat '$MC_PWD_FILE'`"
  13.     if ( -d "$MC_PWD" ) then
  14.         cd "$MC_PWD"
  15.     endif
  16.     unsetenv MC_PWD
  17. endif
  18.  
  19. rm -f "$MC_PWD_FILE"
  20. unsetenv MC_PWD_FILE
  21.